package com.amado.course24;

public class ToStringTest {
	// Integer int区别
	// Integer是对int类型的封装，是int的对象类型
	private Integer price;
	// 0,++
	private int age;
	private String name;
	/**
	 * 0,男，1女
	 */
	private Integer sex;

	public Integer getPrice() {
		return price;
	}

	public void setPrice(Integer price) {
		this.price = price;
	}

	public int getAge() {
		return age;
	}

	public void setAge(int age) {
		this.age = age;
	}

	public String getName() {
		return name;
	}

	public ToStringTest(Integer price, int age, String name, Integer sex) {
		super();
		this.price = price;
		this.age = age;
		this.name = name;
		this.sex = sex;
	}

	public void setName(String name) {
		this.name = name;
	}
	@Override
	public String toString() {
		return "ToStringTest [price=" + price + ", age=" + age + ", name=" + name + ", sex=" + sex + "]";
	}

	public static void main(String[] args) {
		ToStringTest toStringTest = new ToStringTest(11, 11, "商品一", 1);
		System.out.println(toStringTest);
	}
}
